# Plugin Base module
module ObjectiveKyusu::WebBrowser
  module Plugin
    def self.included(base)
      base.send(:include, PluginInstanceMethods)
      base.send(:extend, PluginClassMethods)
    end

    # === Plugin Hash
    class Plugins < Hash
      attr_accessor :browser

      def self.new(browser, obj)
        super(obj)
        @browser = browser
      end

      # === タブの追加
      def add_plugin(plugin_instance)
        self << plugin_instance
      end

      alias remove_tab :delete_at
    end

    # === Plugin Base class
    class Base
      def initialize()
      end
    end
  end

  # === class methods
  module PluginClassMethods

  end

  # === instance methods
  module PluginInstanceMethods

  end
end